import * as dotenv from "dotenv";
import * as fs from "fs";

export default function () {
  const MODE = process.env.MODE || "dev";
  const envFilePath = `.env.${MODE}`;
  if (fs.existsSync(envFilePath)) {
    dotenv.config({ path: envFilePath });
  } else {
    process.exit(1);
  }
}
